package com.jc.ds.model;

/**
 * supplierproduct
 * @author 
 */
public class SupplierProduct extends BaseValueObject {
    private Long id;

    /**
     * 关联 supplier_goods 表的主键
     */
    private Long gid;

    /**
     * 供应商SKU ID 为了兼容不同供应商用文本类型
     */
    private String productId;

    /**
     * 供应商SKU 名称
     */
    private String productName;

    /**
     * 供应商SKU 库存ID，吉贡特有，其它供应商有则存，无则不存
     */
    private String productInventoryId;

    /**
     * SKU规格图片
     */
    private String productImagePath;

    /**
     * 私有云图片地址
     */
    private String selfProductImagePath;

    /**
     * SKU 条码
     */
    private String barCode;

    /**
     * 是否含税 0 不含税  1 含税
     */
    private Integer hastax;

    /**
     * 供应商产品id
     */
    private String goodsId;

    /**
     * 规格字符串JSON格式
     */
    private String specificationsString;

    /**
     * 0 : 不推送
1 : 待推送
2 : 已推送
3 : 推送失败
     */
    private Integer pushStatus;

    /**
     * 图片是否进行压缩 0:未压缩 1: 已经压缩,可以推送
     */
    private Integer isImgCompression;

    /**
     * 库存数,同步更新
     */
    private Integer inventoryNum;

    /**
     * 供应商店铺ID，用于一家供应商下面有多家店铺的情况,下单接口需要用
     */
    private String storeId;

    /**
     * 供应商库存ID
     */
    private String inventoryId;

    /**
     * 信息是否完善
     */
    private String isPerfect;

    /**
     * 扩展字段
     */
    private String extend2;

    /**
     * 扩展字段
     */
    private String extend3;

    /**
     * 扩展字段
     */
    private String extend4;

    /**
     * 扩展字段
     */
    private String extend5;

    private String orderStr = null;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getGid() {
        return gid;
    }

    public void setGid(Long gid) {
        this.gid = gid;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductInventoryId() {
        return productInventoryId;
    }

    public void setProductInventoryId(String productInventoryId) {
        this.productInventoryId = productInventoryId;
    }

    public String getProductImagePath() {
        return productImagePath;
    }

    public void setProductImagePath(String productImagePath) {
        this.productImagePath = productImagePath;
    }

    public String getSelfProductImagePath() {
        return selfProductImagePath;
    }

    public void setSelfProductImagePath(String selfProductImagePath) {
        this.selfProductImagePath = selfProductImagePath;
    }

    public String getBarCode() {
        return barCode;
    }

    public void setBarCode(String barCode) {
        this.barCode = barCode;
    }

    public Integer getHastax() {
        return hastax;
    }

    public void setHastax(Integer hastax) {
        this.hastax = hastax;
    }

    public String getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(String goodsId) {
        this.goodsId = goodsId;
    }

    public String getSpecificationsString() {
        return specificationsString;
    }

    public void setSpecificationsString(String specificationsString) {
        this.specificationsString = specificationsString;
    }

    public Integer getPushStatus() {
        return pushStatus;
    }

    public void setPushStatus(Integer pushStatus) {
        this.pushStatus = pushStatus;
    }

    public Integer getIsImgCompression() {
        return isImgCompression;
    }

    public void setIsImgCompression(Integer isImgCompression) {
        this.isImgCompression = isImgCompression;
    }

    public Integer getInventoryNum() {
        return inventoryNum;
    }

    public void setInventoryNum(Integer inventoryNum) {
        this.inventoryNum = inventoryNum;
    }

    public String getStoreId() {
        return storeId;
    }

    public void setStoreId(String storeId) {
        this.storeId = storeId;
    }

    public String getInventoryId() {
        return inventoryId;
    }

    public void setInventoryId(String inventoryId) {
        this.inventoryId = inventoryId;
    }

    public String getIsPerfect() {
        return isPerfect;
    }

    public void setIsPerfect(String isPerfect) {
        this.isPerfect = isPerfect;
    }

    public String getExtend2() {
        return extend2;
    }

    public void setExtend2(String extend2) {
        this.extend2 = extend2;
    }

    public String getExtend3() {
        return extend3;
    }

    public void setExtend3(String extend3) {
        this.extend3 = extend3;
    }

    public String getExtend4() {
        return extend4;
    }

    public void setExtend4(String extend4) {
        this.extend4 = extend4;
    }

    public String getExtend5() {
        return extend5;
    }

    public void setExtend5(String extend5) {
        this.extend5 = extend5;
    }

    public void orderById(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by id asc";
            }else{
                this.orderStr = this.orderStr + ",id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by id desc";
            }else{
                this.orderStr = this.orderStr + ",id desc";
            }
        }
    }

    public void orderByGid(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by gid asc";
            }else{
                this.orderStr = this.orderStr + ",gid asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by gid desc";
            }else{
                this.orderStr = this.orderStr + ",gid desc";
            }
        }
    }

    public void orderByProductId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by product_id asc";
            }else{
                this.orderStr = this.orderStr + ",product_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by product_id desc";
            }else{
                this.orderStr = this.orderStr + ",product_id desc";
            }
        }
    }

    public void orderByProductName(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by product_name asc";
            }else{
                this.orderStr = this.orderStr + ",product_name asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by product_name desc";
            }else{
                this.orderStr = this.orderStr + ",product_name desc";
            }
        }
    }

    public void orderByProductInventoryId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by product_inventory_id asc";
            }else{
                this.orderStr = this.orderStr + ",product_inventory_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by product_inventory_id desc";
            }else{
                this.orderStr = this.orderStr + ",product_inventory_id desc";
            }
        }
    }

    public void orderByProductImagePath(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by product_image_path asc";
            }else{
                this.orderStr = this.orderStr + ",product_image_path asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by product_image_path desc";
            }else{
                this.orderStr = this.orderStr + ",product_image_path desc";
            }
        }
    }

    public void orderBySelfProductImagePath(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by self_product_image_path asc";
            }else{
                this.orderStr = this.orderStr + ",self_product_image_path asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by self_product_image_path desc";
            }else{
                this.orderStr = this.orderStr + ",self_product_image_path desc";
            }
        }
    }

    public void orderByBarCode(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by bar_code asc";
            }else{
                this.orderStr = this.orderStr + ",bar_code asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by bar_code desc";
            }else{
                this.orderStr = this.orderStr + ",bar_code desc";
            }
        }
    }

    public void orderByHastax(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by hasTax asc";
            }else{
                this.orderStr = this.orderStr + ",hasTax asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by hasTax desc";
            }else{
                this.orderStr = this.orderStr + ",hasTax desc";
            }
        }
    }

    public void orderByGoodsId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by goods_id asc";
            }else{
                this.orderStr = this.orderStr + ",goods_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by goods_id desc";
            }else{
                this.orderStr = this.orderStr + ",goods_id desc";
            }
        }
    }

    public void orderBySpecificationsString(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by specifications_string asc";
            }else{
                this.orderStr = this.orderStr + ",specifications_string asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by specifications_string desc";
            }else{
                this.orderStr = this.orderStr + ",specifications_string desc";
            }
        }
    }

    public void orderByPushStatus(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by push_status asc";
            }else{
                this.orderStr = this.orderStr + ",push_status asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by push_status desc";
            }else{
                this.orderStr = this.orderStr + ",push_status desc";
            }
        }
    }

    public void orderByIsImgCompression(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by is_img_compression asc";
            }else{
                this.orderStr = this.orderStr + ",is_img_compression asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by is_img_compression desc";
            }else{
                this.orderStr = this.orderStr + ",is_img_compression desc";
            }
        }
    }

    public void orderByInventoryNum(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by inventory_num asc";
            }else{
                this.orderStr = this.orderStr + ",inventory_num asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by inventory_num desc";
            }else{
                this.orderStr = this.orderStr + ",inventory_num desc";
            }
        }
    }

    public void orderByStoreId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by store_id asc";
            }else{
                this.orderStr = this.orderStr + ",store_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by store_id desc";
            }else{
                this.orderStr = this.orderStr + ",store_id desc";
            }
        }
    }

    public void orderByInventoryId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by inventory_id asc";
            }else{
                this.orderStr = this.orderStr + ",inventory_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by inventory_id desc";
            }else{
                this.orderStr = this.orderStr + ",inventory_id desc";
            }
        }
    }

    public void orderByExtend1(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by extend1 asc";
            }else{
                this.orderStr = this.orderStr + ",extend1 asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by extend1 desc";
            }else{
                this.orderStr = this.orderStr + ",extend1 desc";
            }
        }
    }

    public void orderByExtend2(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by extend2 asc";
            }else{
                this.orderStr = this.orderStr + ",extend2 asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by extend2 desc";
            }else{
                this.orderStr = this.orderStr + ",extend2 desc";
            }
        }
    }

    public void orderByExtend3(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by extend3 asc";
            }else{
                this.orderStr = this.orderStr + ",extend3 asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by extend3 desc";
            }else{
                this.orderStr = this.orderStr + ",extend3 desc";
            }
        }
    }

    public void orderByExtend4(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by extend4 asc";
            }else{
                this.orderStr = this.orderStr + ",extend4 asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by extend4 desc";
            }else{
                this.orderStr = this.orderStr + ",extend4 desc";
            }
        }
    }

    public void orderByExtend5(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by extend5 asc";
            }else{
                this.orderStr = this.orderStr + ",extend5 asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by extend5 desc";
            }else{
                this.orderStr = this.orderStr + ",extend5 desc";
            }
        }
    }
}